package com.masterlu.study.controller;

import com.alibaba.csp.sentinel.slots.block.flow.FlowException;
import com.masterlu.study.annotation.AnnotationDemo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudyController {


    @Autowired
    private AnnotationDemo annotationDemo;

    @GetMapping("/limit")
    public String limit() {
        try {
            annotationDemo.limitSer();
        } catch (Exception e) {

            return "异常处理";
        }

        return "调用成功";
    }
}
